//
//  TopFlowView.m
//  TripGroup
//
//  Created by apple on 15/10/24.
//  Copyright © 2015年 lanou3g.com蓝鸥科技有限公司. All rights reserved.
//

#import "TopFlowView.h"
#import "UIButton+WebCache.h"
@implementation TopFlowView

- (void)setConfigureModel:(TravelModel *)configureModel
{
    _configureModel = configureModel;
    [self.imgBtn sd_setBackgroundImageWithURL:[NSURL URLWithString:configureModel.image] forState:UIControlStateNormal];
    self.titleLab.text = configureModel.title;
    self.descrLab.text = configureModel.descr;
    
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imgBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        self.imgBtn.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT/4);
        [self addSubview:self.imgBtn];
        
        self.titleLab = [[UILabel alloc]initWithFrame:CGRectMake(0, SCREEN_HEIGHT/4, SCREEN_WIDTH, SCREEN_HEIGHT/24)];
        self.titleLab.font = [UIFont systemFontOfSize:14];
        [self addSubview:self.titleLab];
        
        self.descrLab = [[UILabel alloc]initWithFrame:CGRectMake(0, SCREEN_HEIGHT*7/24-10, SCREEN_WIDTH, SCREEN_HEIGHT/24)];
        self.descrLab.font = [UIFont systemFontOfSize:12];
        [self addSubview:self.descrLab];
        
    }
    return self;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
